package util

import (
	"github.com/gin-gonic/gin"
	"log"
	"svs/model/request"
)

func GetClaims(c *gin.Context) (*request.CustomClaims, error) {
	j := NewJwt()
	claims, err := j.ParseToken(c.Request.Header.Get("token"))
	if err != nil {
		log.Println("权限检查失败，从token中获取用户信息失败")
	}
	return claims, err
}
